; by Jeremy Friesner. Miami support by Fredrik Rambris.
; Updated for v49 by Håkan Parting
(transcript "On installing AMarquee...")
;Take a guess at which stack is installed...
(set DefaultSys 1) ; default to Miami...
(if (= (run "assign inet: EXISTS" (safe)) 0) (set DefaultSys 2)) ; or Inet225 if assign is there
(if (= (run "assign AmiTCP: EXISTS" (safe)) 0) (set DefaultSys 0)) ; or AmiTCP if assign is there
(set tcpsys
(askchoice
(prompt "Which TCP software do you wish to use AMarqueed with?")
(help @askdir-help)
(default DefaultSys)
(choices
"AmiTCP"
"Miami"
"Inet225"
"Other"
)
)
)
(set DaemonFileName "AMarqueed") ; default
(set LibraryFileName"amarquee.library") ; default
(set tcpname "(Unknown)") ; default
(set dbDir "") ; default
(select tcpsys
( ; for AmiTCP
(set servdir "AmiTCP:serv")
(set tcpname "AmiTCP")
(set dbDir "AmiTCP:db")
)
(
(set servdir "") ; for Miami--ask user
(set tcpname "Miami")
)
( ; for Inet225
(set servdir "Inet:serv")
(set tcpname "Inet225")
(set dbDir "Inet:db")
(set DaemonFileName "AMarqueed.inet225")
(set LibraryFileName "amarquee.library.inet225")
)
(set servdir "") ; for Other--ask user
)
(set InstallOpts
(askoptions
(
(prompt "Please indicate which parts of the AMarquee system you wish to install.")
(help "Which parts of the AMarquee system you should install depend on what you want to do with AMarquee on your system. Only install the AMarquee server if you wish to use your computer as a host for other Amigas to connect to with their AMarquee programs. Only install the AMarquee C include files if you wish to write your own AMarquee programs.")
(message "\nThis Installer script only knows how to install AMarqueed for AmiTCP, Inet225, or Miami. To install AMarqueed for another system, you will need to do it yourself. See the AMarquee installation documentation for what needs to be done for Miami, Inet225, or AmiTCP; your TCP stack will likely have similar requirements. This script can still install the other components of the AMarquee package, though.")
(
(if (= servdir "")
(set servdir ; Otherwise, Miami
(askdir
(prompt "Where do you want to put the AMarquee server executable, AMarqueed?")
(prompt "\n\nDo you wish to make AMarqueed resident in memory? This will save memory when multiple connections are active simultaneously.")
(help "Making a program resident causes AmigaDOS to keep its executable in memory permanently. When the program is run, instead of loading a new copy of the code into memory, the resident code is shared by the new process.")
(default 1)
)
)
)
(if (= makeResident 1)
(
(set InetDPath "AMarqueed")
(startup "AMarqueed"
(prompt ("\n\nOkay to put the line\n\nresident >NIL: %s pure\n\ninto your s:user-startup?" (tackon servdir "AMarqueed")))
(help "This line in your user-startup will load AMarqueed into memory so that it can be found when needed by inetd. If you choose not to add this line here, you will need to execute it somewhere else, or inetd will not be able to find AMarqueed and will refuse AMarqueed connections.")
(prompt "\n\nTo use AMarqueed with " tcpname ", the line:\n\nAMarquee 2957/tcp\n\nneeds to be present in your " dbDir "/services file. Do you wish me to update the file? (Note: AMarquee will not receive connections if this line is not precisely as shown above!)")
(help "The inclusion of this line into " dbDir "/services is done by an ARexx script which is smart enough to correctly edit previous installations. Also it will make a backup (to " dbDir "/services.bak) before writing.")
(confirm)
)
(if (not (exists "t:edit_text_succeeded") )
(message "The config file editing script (EditTextFile.rexx) did not complete successfully. You may need to edit your " dbDir "/services file yourself. Look in the 'Installation' section of the AMarquee docs for instructions.")
)
(delete "t:edit_text_succeeded")
(set userName "root")
(if (= tcpsys 2) (set userName "")) ; Inet225 doesn't have the username field
(prompt (cat "\nAlso, the line:\n\nAMarquee stream tcp nowait " userName " " InetDPath "\n\nneeds to be present in your " dbDir "/inetd.conf file. Do you wish me to update that file?\n(Note: AMarquee will not receive connections if this line is not precisely as shown above!)"))
(help "The inclusion of this line into " dbDir "/inetd.conf is done by an ARexx script which is smart enough to correctly edit previous installations. Also it will make a backup (to " dbDir "/inetd.conf.bak) before writing.")
(confirm)
)
(if (not (exists "t:edit_text_succeeded") )
(message "The config file editing script (EditTextFile.rexx) did not complete successfully. You may need to edit your " dbDir "/inetd.conf file yourself. Look in the 'Installation' section of the AMarquee docs for instructions.")
)
)
(
; Do config files for Miami: Create the textfile with a pointer to AMarqueed